<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>斐波那契数列</title>
</head>
<body>
    
</body>
<script>
    (function () {
        // 1 1 2 3 5 8 13 21.......
        function fib(num) {
            if (num <= 2) {
                return 1;
            }
            return fib(num - 1) + fib(num - 2);
        }

        console.log(fib(6))






    })();




</script>
</html>